Pagination is the placement of document items onto pages. If no pagination is conducted, all the data for a document can be presented in one single electronic display. A consumer of such a document can scroll horizontally and/or vertically to bring all of the items of such an unpaginated document into view. On the other hand, if a document is paginated, separate pages of fixed dimensions may be presented as visually discrete entities, allowing consumers to view and/or interact with the items of a document one page at a time.
Historically, when electronically generated documents are paginated, the pages have had fixed dimensions. There are various standard fixed page dimensions available, such as the standard letter 8½×11 inch size, the legal 8½×14 inch size, the “A4” size, and so on. Moreover, the fixed page dimensions for a particular document may be customizable, allowing a software user to specify nonstandard fixed page dimensions for the pages of a document. Still further, some software may allow a user to specify fixed page dimensions on a page-by-page basis, allowing for multiple fixed page dimensions in a single document.
The reason for fixed page dimensions of electronic documents is at least in part because many documents are designed for printing on paper. Paper size will not automatically grow or shrink as necessary to accommodate the items on a page of a document. Moreover, it is generally desirable to present paper pages that are both fixed and uniform. Paper pages will generally be stacked on top of one another in multi-page documents, and pages of different sizes make such a document difficult to stack. However, businesses and individuals are storing more information electronically everyday. For example, in the field of reporting, it is now common for businesses to have up to several billion rows of structured data spanning from tens to hundreds of gigabytes of storage. Most of such reporting documents may never be reduced to paper form.
Pagination of electronic documents with fixed page dimensions (“fixed pagination”) can be computationally expensive. In general, fixed pagination involves determining the aggregate length of all items that may be on a page, and comparing the result to the fixed length of a page. If the items cannot all fit on the page, some items or portions of items may be moved to a subsequent page. These items may then be included in a pagination calculation for the subsequent page.
FIG. 1a illustrates a page 100 with items that have a combined length dimension which is too large for the length of the page 130. To calculate this combined length dimension, the length 110, 111, 112, 113, etc. of the various items can first be determined. This determination may be straightforward in the case of an item such as the top margin 105, requiring only a lookup of the margin length 110.
The length determination may be more tedious, however, in the case of an item with child items. Refer to first item 101. First item 101 may grow or shrink depending on the length of the various child items 101a-101i. Consider a case where most of the child items 101a-101i are one-half inch in length, but child item 101d is one full inch in length. In other words, 112c equals one inch, while 112a and 112b are both one-half inch. In this example, the total length of the second row of first item 101 will be one-half inch greater than might be expected. This one-half inch may affect the determination of which items can or cannot fit on the page 100. The one-half inch may thus also affect the determination of which items can or cannot fit on any subsequent page in the document. Therefore, fixed page-size pagination can be computationally expensive, because it entails a detailed inspection of the dimensions of all items that may be placed on a page. Moreover, the results of the computation for each page may affect the computation for subsequent pages.
FIG. 1b demonstrates that a number of additional features are often added to the basic pagination computations described above. The basic pagination computations typically adhere to a set of rules 150 that is sufficient to at least place all items in a document within the confines of the fixed-size pages. However, it may be desirable to also provide additional pagination features, and many software programs do so. The rules for first additional features 151, second additional features 152, and third additional features 153 represent exemplary rules for performing pagination computations that may be helpful, but not necessary, to those generating and consuming documents with fixed dimension pages.
One example of a rule for an additional feature such as may be included in 151, 152, or 153 is known as “keep together.” Keep together allows a user to designate two or more items that should be presented on a same page. If one item cannot fit on a page, and will therefore be moved to a subsequent page, any items that are designated via “keep together” to be presented on the same page must also be moved.
Another example of a rule for an additional feature is known as “orphan control.” Orphan control prevents the unappealing appearance of a single item or very few items on the top of a new page. Such items are referred to as orphans. For example, the appearance of an orphan on the last page of a document is generally considered undesirable. Various measures may be taken to manipulate the items on previous pages of a document to prevent orphans. Needless to say, these manipulations do not come for free. They are at the expense of increasing the already large number of calculations involved in fixed pagination.
There are a host of such additional pagination features that may be included in rules for additional features 151, 152, and 153. Each such additional feature provides some benefit, at the cost of making fixed-page size pagination more computationally expensive than it could be if it followed only a set of basic fixed pagination rules 150.
Moreover, the additional computational expense provided by such additional features may not be sufficient to overcome the undesirable presentation effects that can result from requiring fixed page dimensions. For example, in the case of “keep together,” there may be items that cannot be presented on a same fixed dimensions page, because their combined dimensions add up to a number larger than will fit on the page. In the case of orphan control, the adjustment of the various other items in a document to preempt the appearance of an orphan may create undesirable visual effects for the adjusted items.
In light of these heretofore unacknowledged deficiencies in the industry, there is an unaddressed need for new systems and methods for pagination that are less computationally expensive and can improve the appearance of documents that are not constrained by physical media.